#!/usr/bin/python
#coding:utf-8
#codeby     道长且阻
#email      ydhcui@suliu.net
#website    http://www.suliu.net

import peewee
userdata = peewee.SqliteDatabase('./data.db') # threadlocals = True
userdata.connect()

class BaseModel(peewee.Model):
    class Meta:
        database = userdata

class Setting(BaseModel):
    stype = peewee.CharField()

class ProxyHistory(BaseModel):
    host = peewee.CharField()
    port = peewee.IntegerField(default=80)
    request = peewee.CharField()
    response = peewee.CharField(default='')

class RepostHistory(BaseModel):
    tabid = peewee.IntegerField()
    host = peewee.CharField()
    port = peewee.IntegerField(default=80)
    request = peewee.CharField()
    response = peewee.CharField(default='')

class BurteHistory(BaseModel):
    tabid = peewee.IntegerField()
    host = peewee.CharField()
    port = peewee.IntegerField(default=80)
    request = peewee.CharField()
    response = peewee.CharField(default='')
